<template>
  <div>
    <nav class="navbar navbar-default navbar-fixed-top">
      <div class="container">
        <div class="row">
          <div class="navbar-header">
            <button type="button" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar" class="navbar-toggle collapsed">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
          </div>
          <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbars">
              <li style="font-size:16px">
                <a href="./#/"><span style="font-weight:700">B2X</span>主页</a>
              </li>
              <li>
                <a href="./#/block">B2X块列表<span class="new_pend">{{btwox_pen}}</span></a>
              </li>
              <!--<li>
                <a href="./#/paylist">支付列表</a>
              </li>-->
              <li>
                <a class="nav-link" href="http://web.poolgpu.com/index.html?coinType=ETH" title="ETH">ETH<span class="new_pend">{{eth_pen}}</span></a>
              </li>
              <li>
                <a class="nav-link" href="http://web.poolgpu.com/index.html?coinType=ETC" title="ETC">ETC<span class="new_pend">{{etc_pen}}</span></a>
              </li>
              <li>
                <a class="nav-link" href="http://web.poolgpu.com/index.html?coinType=EXP" title="EXP">EXP<span class="new_pend">{{exp_pen}}</span></a>
              </li>
              <li>
                <a class="nav-link" href="http://zec.poolgpu.com/page/" title="ZEC">ZEC<span class="new_pend">{{zec_pen}}</span></a>
              </li>
              <li>
                <a class="nav-link" href="http://web.poolgpu.com/index.html?coinType=SC" title="SC">SC<span class="new_pend">{{sc_pen}}</span></a>
              </li>
              <li>
                <a class="nav-link" href="http://btx.poolgpu.com" title="BTX">BTX<span class="new_pend">{{btx_pen}}</span></a>
              </li>
              <li>
                <a class="nav-link" href="http://dcr.poolgpu.com" title="DCR">DCR<span class="new_pend">{{dcr_pen}}</span></a>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </nav>
    <div class="tips-panel container-fluid" hidden>
      <div class="container text-center tips">
        <div class="row">
          <p></p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'topheader',
    data() {
      return {
        btwox: "",
        btx_pen: "",
        zec_pen: "",
        eth_pen: "",
        etc_pen: "",
        exp_pen: "",
        sc_pen: "",
        dcr_pen: ""
      }
    },
    mounted() {
      let that = this;
        $.ajax({
          type: "GET",
          url: "http://zec.poolgpu.com:8999/allblocksnum.shtml",
          data: {},
          dataType: "json",
          success: function(data) {
            if(data.hasOwnProperty("error")) {
              return;
            }
            that.btwox_pen = data.btwoxnum;
            that.btx_pen = data.btxnum;
            that.zec_pen = data.zecnum;
            that.eth_pen = data.ethnum;
            that.etc_pen = data.etcnum;
            that.exp_pen = data.expnum;
            that.sc_pen = data.scnum;
            that.dcr_pen = data.dcrnum;
          }
        });
    }
  }
</script>

<style lang="scss">

</style>
